<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>竞猜</title>
    <link rel="stylesheet" type="text/css" href="/Public/Home/css/aui.css" />
    <style type="text/css">
    p {
        margin-bottom: 0.5rem;
    }
    </style>
</head>

<body>
    <form action="<?php echo U('Home/Guess/betting');?>" onsubmit="return validate_form(this)" method="post">
        <div class="aui-content aui-margin-b-15">
            <ul class="aui-list aui-form-list">
                <li class="aui-list-header">请按照“玩法”规则输入</li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-label">
                            玩法
                        </div>
                        <div class="aui-list-item-input">
                            <input type="text" name="integral" placeholder="名称/号码/积分">
                        </div>
                    </div>
                </li>
            </ul>
        </div>
        <div class="aui-content-padded">
            <p>
                <button class="aui-btn aui-btn-primary aui-btn-block">马上竞猜</button>
                <!-- onclick="showDefault('success')" -->
            </p>
        </div>
    </form>
    <div id="demo"></div>
<footer class="aui-bar aui-bar-tab" id="footer">
    <div class="aui-bar-tab-item" tapmode>
        <a href="<?php echo U('Home/Index/index');?>">
        <i class="aui-iconfont aui-icon-home"></i>
        <div class="aui-bar-tab-label">玩法</div>
        </a>
    </div>
    <div class="aui-bar-tab-item" tapmode>
        <a href="<?php echo U('Home/Guess/index');?>">
        <i class="aui-iconfont aui-icon-star"></i>
        <div class="aui-bar-tab-label">竞猜</div></a>
    </div>
    <div class="aui-bar-tab-item" tapmode>
        <div class="aui-badge">10</div>
        <a href="<?php echo U('Home/Index/lottery');?>">
        <i class="aui-iconfont aui-icon-date"></i>
        <div class="aui-bar-tab-label">开奖历史</div>
        </a>
    </div>
    <div class="aui-bar-tab-item">
        <div class="aui-dot"></div>
        <a href="<?php echo U('Home/Index/user');?>">
        <i class="aui-iconfont aui-icon-my"></i>
        <div class="aui-bar-tab-label">我的</div>
        </a>
    </div>
</footer>
</body>
<script type="text/javascript" src="/Public/Home/script/aui-toast.js"></script>
<script type="text/javascript">

var toast = new auiToast({})
function validate_form(thisform) {
    with(thisform) {
        
        if (integral.value == null || integral.value  == "")
        {
            toast.fail({
                title: "请填写玩法",
                duration: 2000
            });
            
            return false
        }else{
            toast.success({
                title: "提交成功",
                duration: 2000
            });
            return true
        }

      
    }
}
</script>

</html>